# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akonadi-contacts
pkgver=20.04.3
pkgrel=0
pkgdesc="Libraries and daemons to implement Contact Management in Akonadi"
arch="all !armhf"
url="https://community.kde.org/KDE_PIM"
license="LGPL-2.1"
depends_dev="qt5-qtbase-dev kio-dev ki18n-dev kcompletion-dev kconfig-dev
	kcodecs-dev kiconthemes-dev kdbusaddons-dev kservice-dev ktextwidgets-dev
	kwidgetsaddons-dev kxmlgui-dev prison-dev kcontacts-dev kmime-dev
	akonadi-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-contacts-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="ccb65c3874853dc9d9f9dd5b39d8f541357d49543386302c99bd1e978d87c9c5b9aee45f5e5589a4f61a04fd82a2867baf1d4fac0936036559957a9be463bb2d  akonadi-contacts-20.04.3.tar.xz"
